#!/usr/bin/env python3

import threading as mp
import os
import time

def Run(*args):
    print("child pid = ", os.getpid(), ", Run args: ", args)
    for i in range(10):
        print("thread run %d..." % i)
        time.sleep(0.5)
    print("child exit....")


def main():
    print("main pid = ", os.getpid())
    p = mp.Thread(target=Run, args=(123, "kyo"))
    p.start()

    for i in range(10):
        print("main thread run %d..." % i)
        time.sleep(0.5)

    p.join()


if __name__ == "__main__":
    main()
